//
//  SNProductionSearchHistoryManager.m
//  ZhuoxinAgriculture
//
//  Created by stone on 16/12/23.
//  Copyright © 2016年 stone. All rights reserved.
//

#import "SNProductionSearchHistoryManager.h"

@implementation SNProductionSearchHistoryModel

@end
//sn_note:=========  ============================ stone 🐳 ===========/
@interface SNProductionSearchHistoryManager()

@end

@implementation SNProductionSearchHistoryManager
+ (instancetype)sharedManager{
    static id _instance;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        _instance = [[self alloc] init];
    });
    
    return _instance;
}
- (instancetype)init
{
    self = [super init];
    if (self) {
        self.productionsearchHistoryModels = [SNProductionSearchHistoryModel findAll].mutableCopy;
    }
    return self;
}
- (void)addObject:(SNProductionSearchHistoryModel *)model{
    
    [self.productionsearchHistoryModels addObject:model];
    
    dispatch_async(dispatch_get_global_queue(0, 0), ^{
        [model save];
    });
    
}
- (void)deleteObject:(SNProductionSearchHistoryModel *)model{
    
}
@end
